function NumOfTriangle( edges ) {
  // write code here

  let res = []
  let curr = []
  for(let i = 0;i<edges.length-2; i++){
    
      curr.push(edges[i])
      for(let j = i+1; j<edges.length-1; j++){
          curr.push(edges[j])
          for(let k = j+1; k<edges.length; k++){
              curr.push(edges[k])
            //   curr.sort()             
              if(curr[0]+curr[1]>curr[2]&&curr[0]+curr[2]>curr[1]&&curr[2]+curr[1]>curr[0]){
                  res.push([...curr])
                  curr.pop()
                //   console.log(res);
                //   console.log(res.length);
              }
              else{
                  curr.pop()
              }
          }
          curr.pop()
      }
      curr.pop()
  }
 let s = []
 res.forEach(item =>{
    item.sort()
    item = item.join('')
    // console.log(item);
    s.push(item)
  })
  let result = new Set(s)
//   console.log(result.length);
console.log(result);
  return result.size
  
}
console.log(NumOfTriangle([2,3,4,2,2,5,5,2,5]));
